import request from "../../utils/request";

//获取购物车数据
export function getCarList(payload = {}) {
  return request.post("/p/shopCart/info", payload);
}

//单选 全选
export function getTotalPay(p = []) {
  return request.post("/p/shopCart/totalPay", p);
}

//加减
export function getChangeItem(t = { count: 1, prodId: 71, shopId: 1, skuId: 385 }) {
  return request.post("/p/shopCart/changeItem", t);
}

//删除
export function getDeleteItem(arr) {
  return request.delete("/p/shopCart/deleteItem",arr,{body:arr});
}

//结算
export function getConfirm(com={addrId: 0, basketIds: [162], couponIds: [], userChangeCoupon: 1}){
  return request.post("/p/order/confirm",com)
}

//提交订单
export function getSubmit(submit={orderShopParam: [{remarks: "", shopId: 1}]}){
  return request.post("/p/order/submit",submit)
}

//支付
export function getPay(pay={payType: 1, orderNumbers: "1469273581857935360"}){
  return request.post("/p/order/pay",pay)
}